
sudo apt-get install usb-modeswitch -y
sudo apt-get install usb-modeswitch-data -y

sudo sed -i "/# Realtek/a\ATTR{idVendor}==\"0bda\", ATTR{idProduct}==\"1a2b\", ATTR{bConfigurationValue}!=\"\$env{REALTEK_NIC_MODE}\", ATTR{bConfigurationValue}=\"\$env{REALTEK_NIC_MODE}\"" /etc/udev/rules.d/50-usb-realtek-net.rules

echo 'Setting rules' 

echo 'Installing...'

KVER=$(uname -r)

sudo install -p -m 644 8188gu.ko  /lib/modules/$(KVER)/kernel/drivers/net/wireless/

sudo /sbin/depmod -a $(KVER)

echo 'Install RTL8188G Wireless USB Driver complete!'
